﻿/***
 * 测试Git的分支和合并问题
 * 2016-03-31 09:58:42
 * **/
using System;
using System.Net;
using System.Threading.Tasks;

namespace TestGitBranch
{
    class Program
    {
        static void Main(string[] args)
        {
            //Program.TestGit_luohx_1001();
            SynchronizedAPI();
            Console.Write("press any key to continue...");
            Console.ReadKey();
        }

        private static void Version_One()
        {
            Console.WriteLine("这是第一个版本");
        }

        private static void Version_Two()
        {
            Console.WriteLine("这是第二个版本");
        }

        private static void Say()
        {
            Console.WriteLine("这是Dev分支上开发的方法");
        }
        
        public static void Version_three()
        {
            Console.WriteLine("这是一个方法，最初在master上创建" + DateTime.Now.ToShortDateString());
        }

        /// <summary>
        /// 2016-5-17 21:11:09
        /// </summary>
        public static void Version_Dev_four()
        {
            Console.WriteLine("这是一个方法，最初在dev上创建" + DateTime.Now.ToShortDateString());
        }

        public static void TestGit_luohx_517()
        {
            Console.WriteLine("brunch:TestGit_luohx_517,base on dev");
        }

        public static void TestGit_luohx_1001()
        {
            Console.WriteLine("Master:TestGit_luohx_1001,base on dev");
        }

        #region 异步方法测试
        private const string url = "http://www.cninnovation.com";
        public static async Task SynchronizedAPI()
        {
            Console.WriteLine(nameof(SynchronizedAPI));
            using (var client = new WebClient())
            {
                string content = await client.DownloadStringTaskAsync(url);
                Console.WriteLine(content);
            }
            Console.WriteLine();
        }

        #endregion
    }
}
